<?php
header('content-type:text/html;charset=utf-8');

$preg = '/\.(baidu|google)\./';
$str = "baidu的网址是百度www.baidu.com谷歌www.google.com";

//$re = preg_replace($preg,'.houdunwang.',$str);

$re = preg_replace($preg,'.bilibili.com.',$str);

echo $re;

